package com.yingli.fragment.base;

import android.graphics.Color;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;



public abstract class BaseAbsActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        Fresco.initialize(this);
        //允许使用transition
//        getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
        setContentView(getContentViewId());
        initCView(savedInstanceState);
        initCData();
        changeStatusWhite(false);
    }

    @Override
    public boolean moveTaskToBack(boolean nonRoot) {
        return super.moveTaskToBack(nonRoot);
    }

    protected abstract int getContentViewId();

    protected abstract void initCView(Bundle savedInstanceState);

    protected abstract void initCData();

    protected void changeStatusWhite(boolean change) {
        if (change) {
        }
    }

    protected void changeStatusWhite(boolean change, int color) {
        if (change) {
        }
    }

    protected void finifshActivity() {
        finish();
    }

    @Override
    protected void onResume() {
        super.onResume();
//        MobclickAgent.onResume(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
//        MobclickAgent.onPause(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }


}
